package com.qen.sheji.zhuanshiqi;

import cn.hutool.core.lang.Console;

public class ClientMain {

    public static void main(String[] args) {
        var text = "qen.com";

        var path = "/Users/a1/Documents/Git/Kotlin/Eleven/out/qen.txt";
        Console.log("原始内容：" + text);
//        var rw = new FileReaderWriter(path);
//        var rw = new EncryptionFileReaderWriter(new FileReaderWriter(path));
        var rw = new CompressionFileReaderWriter(new FileReaderWriter(path));
//        var rw = new CompressionFileReaderWriter(new EncryptionFileReaderWriter(new FileReaderWriter(path)));
        rw.write(text);

        var fr = new FileReaderWriter(path);
        System.out.println("加密后：" + fr.read());
        System.out.println("解密后：" + rw.read());
    }

}
